<!--index--页面顶部导航栏-->
<nav class="navbar navbar-default" role="navigation">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">AILK-CRM 版本管理系统</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul id="navMenu" class="nav navbar-nav">
                <!--<li><a href="#">首页<span class="sr-only">(current)</span></a></li>-->
                <!--<li class="active"><a id="btnAddTask" href="#">申请变更单</a></li>-->
                <%if(menus&&menus!=null){ var secFlag=false; var thirdFlag=false;%>
                    <li><a class="menuBtn" btnname="btnSubmitApply" btnurl="/task/tt" href="#" id="btnSubmitApply">申请变更单</a></li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">视图<span class="caret"></span></a>
                        <ul class="dropdown-menu" role="menu">
                            <% menus.forEach(function(menu){ %>
                                <%var menuId = menu.menuId; var menuName = menu.menuName; var menuBtnName=menu.menuBtnName; var menuUrl=menu.url;%>
                                <li><a class="menuBtn" btnName="<%=menuBtnName%>" btnUrl="<%=menuUrl%>" href="<%=menuUrl%>" id="<%=menuBtnName%>"> <%= menuName %> </a></li>
                            <% }); %>

                            <!--<% menus.forEach(function(menu){ %>-->
                                <!--<%var menuId = menu.menuId; var menuName = menu.menuName; var menuBtnName=menu.menuBtnName; var menuUrl=menu.url;%>-->
                                <!--<% if(menuId<=3){ %>-->
                                    <!--<li><a class="menuBtn" btnName="<%=menuBtnName%>" btnUrl="<%=menuUrl%>" href="#" id="<%= menuName %>"> <%= menuName %> </a></li>-->
                                <!--<% }else if(menuId>3 && menuId<=5){  %>-->
                                    <!--<% if(!secFlag){ %>&lt;!&ndash;分隔条&ndash;&gt;-->
                                        <!--<li class="divider"></li>-->
                                    <!--<% secFlag=true;} %>-->
                                        <!--<li><a class="menuBtn" btnName="<%=menuBtnName%>" btnUrl="<%=menuUrl%>" href="#"> <%= menuName %> </a></li>-->
                                <!--<% }else if(menuId>5){  %>-->
                                    <!--<% if(!thirdFlag){ %>&lt;!&ndash;分隔条2&ndash;&gt;-->
                                        <!--<li class="divider"></li>-->
                                    <!--<% thirdFlag=true;} %>-->
                                    <!--<li><a class="menuBtn" btnName="<%=menuBtnName%>" btnUrl="<%=menuUrl%>" href="#"> <%= menuName %> </a></li>-->
                                <!--<% } %>-->
                            <!--<% }) %>-->
                        </ul>
                    </li>
                <% } %>
            </ul>
            <form class="navbar-form navbar-left" role="search">
                <div class="input-group">
                    <input type="text" class="form-control" placeholder="输入变更单号搜索">
                    <span class="input-group-btn">
                        <button class="btn btn-default" type="button">搜索</button>
                    </span>
                </div>
            </form>
            <ul class="nav navbar-nav navbar-right">
                <%if(!user){ %>
                <li class="dropdown"><a href="/users/login">登录</a></li>
                <li class="dropdown"></li>
                <li class="dropdown"><a href="/users/reg">注册</a></li>
                <% } else { %>
                <!--<li class="dropdown"><a href="#">当前用户：(<%=user.userName%>)</a></li>-->
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">当前用户：(<%=user.userName%>)<span class="caret"></span></a>
                    <ul class="dropdown-menu" role="menu">
                        <li><a href="/users/modifyUser">修改资料</a></li>
                        <li class="divider"></li>
                        <li><a href="/users/logout">退出</a></li>
                    </ul>
                </li>
                <% } %>
            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>